package com.oldman.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResultVO {
    private int code;
    private String msg;
    private Object data;

    public static ResultVO success(Object obj){
        return new ResultVO(200,"操作成功",obj);
    }

    public static ResultVO success(){
        return new ResultVO(200,"操作成功",null);
    }

    public static ResultVO fail(){
        return new ResultVO(500,"操作失败",null);
    }

}
